<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/head.jsp"%>
<html>
	<head>
		<link href="${ctx}/styles/admin/admin.css" type="text/css"
			rel="stylesheet">
		<link href="${ctx}/extremecomponents/extremecomponents.css"
			type="text/css" rel="stylesheet">
		<title><fmt:message key="global.title" />
		</title> 
	</head>
	<body>
		<div id="content">
			<h1>
				<fmt:message key="module.list" />
			</h1>
			<div style="text-align:right;">
				<c:set var="buttons">
					<input style="cursor:hand;" onclick="javascript:clickFunction('${ctx}/admin/module/edit.html');" type="button" value="<fmt:message key="button.add"/>">
				</c:set>
				<c:out value="${buttons}" escapeXml="false" />
			</div> 
			<ec:table items="modules" var="module"
				action="${ctx}/admin/module/list.html" filterable="false">
				<ec:exportXls fileName="modulelist.xls" tooltip="export Excel" />
				<ec:exportPdf fileName="modulelist.pdf" tooltip="export Pdf" />
				<ec:exportCsv fileName="modulelist.csv" tooltip="export csv" />
				<ec:row>
					<ec:column property="checkbox" title="button.choice"
						sortable="false" viewsAllowed="html">
						<input type="checkbox" name="itemlist" value="${module.id}"
							style="border:0px" />
					</ec:column>
					<ec:column property="rowcount" cell="rowCount"
						title="global.number" sortable="false" viewsAllowed="html" />
					<ec:column property="title" title="module.title"></ec:column>
					<ec:column property="descn" title="module.descn" />
					<ec:column property="edit" title="button.edit" sortable="false"
						viewsAllowed="html">
						<A href="${ctx}/admin/module/edit.html?id=${module.id}"
							title="<fmt:message key="button.edit"/>"> <img
								src="<c:url value="/images/icon/modify.gif"/>" border="0" /> </A>
					</ec:column>
				</ec:row>
			</ec:table>
			<div style="text-align:right;">
				<c:out value="${buttons}" escapeXml="false" />
			</div>
		</div>
	</body>
</html>
<script type="text/javascript" language="javascript">

function clickFunction(href){
	//alert(href);
	location.href=href;
}
</script>